package com.market.controller;

import com.market.common.vo.ResponseCode;
import com.market.common.vo.ResponseResult;
import com.market.entity.TransactionDetail;
import com.market.service.TransactionDetailService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/transactionDetails")
public class TransactionDetailsController {
    @Resource
    TransactionDetailService transactionDetailService;

    /**
     * 终端销售交易明细
     * @return
     */
    @GetMapping("/dealDetail")
    public ResponseResult<List<TransactionDetail>> dealDetail() {
        List<TransactionDetail> transactionDetails = transactionDetailService.dealDetail();
        return ResponseResult.success(ResponseCode.SUCCESS, transactionDetails);
    }


}
